#ifndef __IMAGE_CODE_H__
#define __IMAGE_CODE_H__

#include "Common.h"
#include "ImageManager.h"

namespace RayFrame
{
  class Image;

  class ImageCodec
  {
  public:
    ImageCodec();
    virtual ~ImageCodec();

    virtual Image* LoadFromMemory(unsigned width, unsigned height, unsigned bpp) = 0;
    virtual Image* LoadFromFile(STRING filename) = 0;
    DLL_DECLARE virtual bool SaveToFile(Image* image, STRING filename, ImageFileFormat iff) = 0;

    virtual bool InitLibrary(){ return false; };
    virtual bool DestroyLibrary(){ return false; };

    static ImageCodec* GetCodec();
  };
}

#endif